;This ASM file when assembled and linked will make SELECT.EXE which you invoke
;in a batch file as follows: SELECT abcdefg
;where the chars that follow SELECT (the command tail) can be any combination
;of LOWER-CASE letters. Select then waits for you to type one of the letters on ;its command tail. If the key you press is not on SELECT's command tail, it
;beeps. If the key you press is on it's command tail, select returns the
;alphabetical position of your letter ( 'a' = 1 ). You can then use the IF
;ERRORLEVEL commands to check which letter was pressed. This is ideal for
;implementing menus in autoexec.bat or some other batch file. Don't run select
;without a command tail!
;NOTE: ALL TEXT ON A LINE IN THIS ASM FILE FOLLOWING A SEMICOLON IS A COMMENT.
;MASM WILL IGNORE ALL COMMENTS AND THEY ARE THERE TO PROVIDE EXPLANATIONS TO
;THE CODE. YOU CAN ASSEMBLE FILE AS IS.
name select
page 55,78
title SELECT.EXE: Allows user to choose from alphabetical menu
;The above section (name, page, and title) is only useful if you want to create
;a listing file (SELECT.LST) of the program (to create a listing file type the
;name of the program when MASM prompts you: [NUL.lst]).
cr equ 0dh ;calling 13 'cr' (carriage return is ASCII 13 or 0Dh)
lf equ 0ah ;calling 10 'lf' (line feed is ASCII 10 or 0Ah [hex])